import {requestResponse} from '../../../../config/axios.conf'

// 全部话题列表
export const allTopicListApi = (count: Number) => requestResponse('get', '/anon/Community/jyjTopicClass/queryTopicSquareList', {count})
// 我关注的话题
export const myFollowTopic = (json: any) => requestResponse('get', '/authc/Community/jyjTopicClass/queryMyFollowTopicPage', json)
// 是否收藏
export const queryMyFollowTopicIds = (json: any) => requestResponse('get', '/anon/Community/jyjTopicClass/queryMyFollowTopicIds', json)

// 添加关注话题
export const addFollowTopic = (json: any) => requestResponse('get', '/authc/Community/jyjTopicClass/focusOnTopics', json)
// 取消关注话题
export const deleteFollowTopic = (json: any) => requestResponse('get', '/authc/Community/jyjTopicClass/cancleFollowedTopics', json)
// 话题详情页 -- 问题 （通过话题id加载该话题下所有的问题）
export const topicDetaileProblem = (json: any) => requestResponse('get', '/anon/Community/jyjTopicProblem/findTopicProblemByConditionForPage', json)
// 话题详情页 -- 回复 （通过问题id加载所有回复）
export const problemAnswers = (json: any) => requestResponse('get', '/anon/Community/jyjTopicReply/findTopicReplyTreeByQuestionId', json)
// 话题详情页 -- 话题
export const topicDetails = (json: any) => requestResponse('get', '/anon/Community/jyjTopicClass/findTopicClassById', json)
// 我的话题（发布/参与）
export const myTopics = (json: any) => requestResponse('get', '/authc/Community/jyjTopicClass/queryMyTopicPage', json)
// 发布问题
export const raiseQuestions = (json: any) => requestResponse('post', '/authc/Community/jyjTopicProblem/addTopicProblem', json)
// 回复问题
export const replyQuestion = (json: any) => requestResponse('post', '/authc/Community/jyjTopicReply/replyToQuestion', json)
// 通过回复id加载下面的评论
export const getComByReplyId = (json: any) => requestResponse('get', '/anon/Community/jyjTopicReply/findTopicReplyTreeByReplyId', json)
